-- GENERATED SPELL FOR [Shadowmoon Blood Mage] --


function spell0_22945(pUnit, Event) --@Blood Siphon,Self--
pUnit:FullCastSpellOnTarget(41068,pUnit)
pUnit:RegisterEvent('Sorts_22945', 652, 1)
end

function spell1_22945(pUnit, Event) --@Bloodbolt,n/a--
pUnit:FullCastSpellOnTarget(41072,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22945', 3000, 1)
end

function Sorts_22945(pUnit, Event)
local choix_sorts_22945 = math.random(0, 1)
if choix_sorts_22945 == 0 then
pUnit:RegisterEvent('spell0_22945', 1, 1)
end
if choix_sorts_22945 == 1 then
pUnit:RegisterEvent('spell1_22945', 1, 1)
end
end

function mob22945_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22945', math.random(1500, 3000), 1)
end

function mob22945_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22945_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22945_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22945, 1, 'mob22945_Action')
RegisterUnitEvent(22945, 2, 'mob22945_Leave')
RegisterUnitEvent(22945, 3, 'mob22945_Kill')
RegisterUnitEvent(22945, 4, 'mob22945_Die')
